When a circuit having a time constant like an oscillator or a filter is mounted in a semiconductor integrated circuit, the time constant could be changed, by a process change or operation conditions of the semiconductor integrated circuit. In order to keep the time constant (for instance, an oscillating frequency, or specific frequency) of these circuits in a specific range, a time constant regulation device has been used.
In Japanese Patent Application No. H10-222198 entitled “FILTER CHARACTERISTICS REGULATION METHOD AND APPARATUS” filed Aug. 6, 1998 by the present applicant, for instance, the time constant regulation device has been disclosed as a filter characteristic regulation device for regulating the characteristic frequency of a filter. Such a time constant regulation apparatus, for instance, enters a step signal containing a wide frequency band signal into a filter, to allow the filter to output the output signal corresponding to the characteristic frequency of the filter, and measures the frequency of the output signal, and supplies a control signal to the filter so that the obtained frequency can be a desired characteristic frequency. Generally, frequency is measured by counting the number of waves of a reference clock of the output signal during a specified cycle.
The adjustment accuracy of such a time constant regulation device as described above is significantly affected by an accuracy of a frequency measurement circuit, a component element of the device. As described above, in the case of entering a step signal to measure the frequency of the output signal, since the waveform of the output signal can decay in a short period of time, it is required to count the number of waves of a reference clock in a short period of time. Further, the frequency of the reference clock cannot be set with excessive freedom, due to the requirement of other circuits.
FIG. 11 is a configuration drawing of the conventional frequency measurement circuit. And, FIG. 12 shows an operating waveform diagram of the circuit. The frequency measurement circuit shown in FIG. 11 is a circuit to measure the frequency of the input signal Cin, and measures the cycle of the input signal Cin, utilizing the reference clock Cb having a shorter cycle than the input signal Cin, and known frequency. The frequency measurement circuit includes a select signal generator circuit 1 which counts the predetermined number of pulses (or number of waves) of the input signal Cin, when the input signal Cin is entered, and generates a select signal SEL during the counting, a selector circuit 2 to allow the reference clock Cb to pass through while the select signal SEL is an H level, and a reference clock wave number measurement circuit 3 to count the number of pulses (or number of waves) of the supplied reference clock Cb. Also, to the select signal generator circuit 1 and the reference clock wave number measurement circuit 3, both of which have a wave number measuring function, a reset signal Rst is supplied.
As shown in FIG. 12, when the cycle of the input signal Cin to be measured is expressed by tm, and the cycle of the reference clock C6 is expressed by tB, by counting the reference clock Cb during the period of the M cycle of the input signal Cin, the cycle of the input signal Cin can be measured, and further, the frequency fm of the input signal Cin can be obtained. As shown in the operating waveform diagram in FIG. 12, by the reset signal Rst having at an L level for the first time, the select signal generator circuit 1 and the reference clock wave number measurement circuit 3 is reset. And, during the M cycle of the input signal Cin corresponding to the time from t0 through tM, the select signal SEL is kept at the H level, and the reference clock Cb is supplied to the reference clock wave number measurement circuit 3. The reference clock wave number measurement circuit 3 counts, for instance, the number of the rising edges of the reference clock Cb during that time, and outputs the final counted value as the frequency measurement result OUT.
Generally, there are few cases where the phase of the input signal Cin perfectly agrees with the phase of the reference clock Cb. Therefore, by counting the rising edges (or the falling edges, or both of the rising and falling edges) of the reference clock Cb, during the period from the rising edge (t0) of the input signal Cin to the Mth rising edge (tM), the reference clock wave number measurement circuit 3 can count the number of waves N of the reference clock Cb with satisfactory accuracy. The period of counting can be either from the rising or the falling edge to the rising or falling edge.
However, when the edge of the input signal and the edge of the reference clock determining the operating period of both of the wave number measurement circuits 1 and 3 are agreed at the time when measurement starts, or when measurement ends, an error can take place in the measurement made by the reference clock wave number measurement circuit 3. In other words, as shown in FIG. 12, at the time when wave number counting starts tO and at the time when the wave number counting ends tM, the phase of the input signal Cin may agree with the phase of the reference clock Cb. In such a worst case, a wave number measurement circuit in the reference clock wave number measurement circuit 3 can erroneously count the rising edge of the reference clock Cb, at the times tO and tM. This possibility is caused by the following two cases, e.g. (1) in the case where the circuit dose not count the rising edge of the reference clock Cb both at the times tO and tM; and (2) in the case where the circuit counts the rising edge of the reference clock Cb both at the times tO and tM. In the case of (1), the total number of counts is N−1, and in the case of (2), the total number of count is N+1. Here, when the rising edge of the reference clock is counted at either time of tO or tM, there is no problem, since the counted result is the same as the normal counted number.
In normal cases, if the counted number of waves of the reference clock measured by the reference clock wave number measurement circuit 3 is N to the measured wave number M of the input signal Cin, when the frequency of the reference clock is fB, the frequency fm of the input signal can befm=(M/N)fB  (1)
On the other hand, when both of the phases agreed, if the counted number of waves of the reference clock is N±1 to the measured wave number M of the input signal, the frequency fm of the input signal isfm=(M/(N±1))fB  (2)
Accordingly, the measurement error is as the following equation.                               Δ          ⁢                                           ⁢          f                =                                                            M                                  N                  ±                  1                                            ⁢                              f                B                                      -                                          M                N                            ⁢                              f                B                                              =                                                    ∓                M                                            N                ⁡                                  (                                      N                    ±                    1                                    )                                                      ⁢                          f              B                                                          (        3        )            
In the conventional examples, in order to improve the accuracy in the measured frequency, according to the equation (3), it can be considered to increase the counted number of waves N by increasing the measured wave number M, or, by increasing the frequency fB of the reference clock Cb to be counted by the wave number measurement circuit 3. However, if the measured number of waves M is increased, the measurement time becomes longer.
As described above, in the case of entering a step signal into a filter, and measuring the frequency of the output waveform outputted from the filter, since the output signal can decay in a short period of time, the measurement time is not preferable to be extended. Also, when the reference clock is heightened, the current consumption is increased, and moreover, since the reference clock cannot be set optionally in many cases, for reasons of using a semiconductor integrated circuit, thoughtless higher setting for the reference clock cannot be made.
It is therefore an object of the present invention to provide a frequency measurement circuit that enables the accuracy in measuring frequency to be improved, even when the measurement time is short.
Another object of the present invention is to provide a frequency measurement circuit that enables the accuracy in measuring frequency to be improved, without the need to raise the frequency of the reference clock.